const http = require('http')

const server = http.createServer((req, res) => {
  // console.log(req.url);
  // let str = ''
  // req.on('data', (chunk) => {
  //   str += chunk
  // })
  // req.on('end', () => {
  //   console.log(str);
  // })
  res.write('hello')
  res.end(' world')
})

server.listen(3000, function() {
  console.log('server is running...');
})